import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:flutter_base/config/app_routes.dart';
import 'package:flutter_base/base/widget/base_get_builder.dart';
import 'package:flutter_base/generated/assets.dart';
import 'package:flutter_base/widgets/image/auto_image.dart';
import 'package:flutter_base/user/app_user_manager.dart';
import 'splash_logic.dart';

class SplashPage extends StatelessWidget {
  final logic = Get.put(SplashLogic());

  SplashPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return BaseGetBuilder<SplashLogic>(
      // hideAppBar: true,
      builder: (_) {
        return Container(
          width: double.infinity,
          height: double.infinity,
          color: Colors.white,
          child: Stack(
            alignment: Alignment.center,
            children: [
              // 中心Logo
              Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  // AutoImage(
                  //   Assets.commonAppLogo,
                  //   width: 120.w,
                  //   height: 120.w,
                  // ),
                  SizedBox(height: 20.w),
                  Text(
                    '欢迎使用',
                    style: TextStyle(
                      fontSize: 18.sp,
                      fontWeight: FontWeight.bold,
                      color: Colors.black,
                    ),
                  ),
                ],
              ),
              
              // 底部版本号
              Positioned(
                bottom: 40.w,
                child: Text(
                  'v${logic.version}',
                  style: TextStyle(
                    fontSize: 14.sp,
                    color: Colors.grey,
                  ),
                ),
              ),
            ],
          ),
        );
      },
    );
  }
} 